<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>课程包管理</title>
<style type="text/css">
input[type=radio], input[type=checkbox] {
	width: 20px;
	height: 20px;
}
</style>

<%@ include file="../common/importLib.jsp"%>
<script type="text/javascript" src="/mrjy/common/jquery-easyui/js/jquery.jdirk.js"></script>
<script type="text/javascript" src="/mrjy/common/jquery-easyui/js/jeasyui.extensions.combobox.autoComplete.js"></script>

<link rel="stylesheet" href="/mrjy/common/quill-1.2.5/css/quill.snow.css"/>
<script type="text/javascript" src="/mrjy/common/quill-1.2.5/js/quill.js"></script>

<script type="text/javascript">
	var videoFileSize = 0;

	/**
	 * 增删改查参数设置
	 */
	tableTitle = "课程包基本信息";
	tableURL = getTimeURL("coursePackageInfo/selectPageByCoursePackageTypeForBack.do");
	toolbarView = 6;
	tableColumns = [ [
			{
				field : 'ck',
				checkbox : true
			},
			{
				field : 'id',
				title : 'id',
				width : 0,
				rowspan : 1
			},
			{
				field : 'opt',
				title : '操作',
				width : 120,
				align : 'center',
				rowspan : 1,
				formatter : function(value, rowData, rowIndex) {
					var queryUrl = 'coursePackageInfo/selectById.do?id=' + rowData.id;
					var html = "<a title='修改' class='xxl_linkbutton' iconCls='icon-edit' href='javascript:datagridUpdate(\""
							+ queryUrl
							+ "\")'>修改</a>";
					return html;
				}
			},
			{
				field : 'coursePackageName',
				title : '课程包名称',
				width : 200,
				align : 'center',
				rowspan : 1
			}, {
				field : 'coursePackageDesc',
				title : '课程包描述',
				width : 200,
				align : 'center',
				rowspan : 1,
				formatter :function(value, rowData, rowIndex){
					this.REGX_HTML_ENCODE = /"|&|'|<|>|[\x00-\x20]|[\x7F-\xFF]|[\u0100-\u2700]/g;
					return (typeof value != "string") ? value :  value.replace(this.REGX_HTML_ENCODE,
	                    function ($0) {
	                        var c = $0.charCodeAt(0), r = ["&#"];
	                        c = (c == 0x20) ? 0xA0 : c;
	                        r.push(c);
	                        r.push(";");
	                        return r.join("");
	                    });
				}
			}, {
				field : 'discountPrice',
				title : '折扣价',
				width : 60,
				align : 'center',
				rowspan : 1
			}, {
				field : 'originalPrice',
				title : '原价',
				width : 60,
				rowspan : 1
			}, {
				field : 'totalCourseNum',
				title : '总课堂数',
				width : 60,
				rowspan : 1
			},
			{
				field : 'userName',
				title : '导师名称',
				width : 80,
				rowspan : 1
			}, {
				field : 'coursePackageType',
				title : '课程包类型',
				width : 120,
				rowspan : 1,
				formatter : function(value, rowData, rowIndex) {
					if (rowData.coursePackageType == 1) {
						return "<font color='green'>话题课程包</font>";
					} else if(rowData.coursePackageType == 2) {
						return "<font color='green'>导师课程包</font>";
					}
				}
			}, {
				field : 'coverUrl',
				title : '封面图',
				width : 120,
				rowspan : 1,
				/* formatter :function(value, rowData, rowIndex){
					if(rowData.coverUrl==""){
						return "";
					}else{
						var url=mrjyFile+"maintain/coursePackagePic/"+rowData.coverUrl+"?"+new Date().getTime();
						return "<img onclick=\"viewPic('"+url+"')\" src='"+url+"' style='width:640px;height:360px;'/>";
					}
				} */
			}, {
				field : 'createTimeString',
				title : '创建时间',
				width : 150,
				rowspan : 1
			},
			{
				field : 'disableFlag',
				title : '禁用状态',
				width : 80,
				align : 'center',
				rowspan : 1,
				formatter : function(value, rowData, rowIndex) {
					if (rowData.disableFlag == 0) {
						return "<font color='green'>起用</font>";
					} else {
						return "<font color='red'>禁用</font>";
					}
				}
			} ] ];

	var addWidth = 830; //添加窗口宽度
	var addHeight = 520; //添加窗口高度
	var addTitle = "添加课程包基本信息"; //添加标题
	var updateWidth = 830; //修改窗口宽度
	var updateHeight = 520; //修改窗口高度
	var updateTitle = "修改课程包基本信息"; //修改标题
	var updateDisableFlagUri = "coursePackageInfo/updateDisableFlag.do"; //禁用、起用记录
	var deleteUri = "coursePackageInfo/deleteByIds.do"; //删除记录
	var addVideoUri = "../maintain/userInfo/userListNoPage.do"; //批量增加视频

	/**
	 * 初始化添加表单
	 */
	function initAddForm() {
		//addFormProcess("videoName", "课程包基本信息", true);
		$("#userId").combobox({
			url : "../maintain/userInfo/userListNoPage.do?roleId=2",
			valueField : 'id',
			textField : 'text',
			editable : true,
			onSelect : function(data) {
			}
		}); 
		$("#coursePackageType").combobox({
			onSelect : function(data){
				var val=$('#coursePackageType').combobox('getValue');
				if(val == 1){//话题课程包
					$("#userId_Add_tr").hide();
				}else if(val ==2){//导师课程包
					$("#userId_Add_tr").show();
				}
			}
		}).combobox("select", 2);//默认选中导师课程包
		/* $("#coursePackageType").change(function(e){
			var val = $('#coursePackageType option:selected').val();//选中的值
			if(val == 1){//话题课程包
				$("#userId_Add_tr").hide();
			}else if(val ==2){//导师课程包
				$("#userId_Add_tr").show();
			}
		}); */
		/* $("#typeId").combobox({
			url : "../video/videoType/queryList.do",
			valueField : 'id',
			textField : 'typeName',
			editable : false,
			onSelect : function(data) {
			}
		}); */
		
		var order = [];
		for (var i = 1; i <= 30; i++) {
			order.push({
				num : i
			});
		}
		/* $("#orderNum").combobox({
			data : order,
			valueField : 'num',
			textField : 'num',
			editable : false,
			onSelect : function(data) {
			}
		}); */
		
		//openPicUpload();
		openPicUpload3();
		//富文本初始化
		if(quillAdd == ""){
			quillAdd  = new Quill("#coursePackageDescAdd", {
				  modules: {
				    toolbar: {
				      container: "#toolbarAdd",  
				      handlers: {
				       'image': imageHandlerAdd
				      }
				    }
				  },
				  theme: 'snow',
				  placeholder: '填写课程包描述'
			});
			
		}
		
	}

	/**
	 * 初始化修改表单
	 */
	function initUpdateForm(jsonObject) {
		//alert(JSON.stringify(jsonObject));
		var info = jsonObject.info
		$("#idUpdate").val(info.id);
		$("#coursePackageNameUpdate").val(info.coursePackageName);
		
		$("#discountPriceUpdate").val(info.discountPrice);
		$("#originalPriceUpdate").val(info.originalPrice);
		$("#totalCourseNumUpdate").val(info.totalCourseNum);
		$("#coursePackageTypeUpdate").combobox({
			onSelect : function(data){
				var val=$('#coursePackageTypeUpdate').combobox('getValue');
				if(val == 1){//话题课程包
					$("#userIdUpdate_Add_tr").hide();
				}else if(val ==2){//导师课程包
					$("#userIdUpdate_Add_tr").show();
				}
			}
		}).combobox("select", info.coursePackageType);

		$("#userIdUpdate").combobox({
			url : "../maintain/userInfo/userListNoPage.do?roleId=2",
			valueField : 'id',
			textField : 'text',
			editable : true,
			onSelect : function(data) {
			}
		}).combobox("select", info.userId);
		
		
		
		$("#coverUrlUpdate").val(info.coverUrl);
		$("#uploadPicUpdate2").attr("src",mrjyFile+"maintain/coursePackagePic/"+info.coverUrl+"?"+new Date().getTime());
		
		openPicUploadUpdate2();
		if(quillUpdate == ""){
			quillUpdate  = new Quill("#coursePackageDescUpdate", {
				  modules: {
				    toolbar: {
				      container: "#toolbarUpdate",  
				      handlers: {
				       'image': imageHandlerUpdate
				      }
				    }
				  },
				  theme: 'snow',
				  placeholder: '填写课程包描述'
			});
		}
		
		//初始化课程包描述
		initCoursePackageDescUpdate(info.coursePackageDesc);
	}
	
	//初始化课程包编辑页面的课程包描述
	function initCoursePackageDescUpdate(coursePackageDesc){
		//富文本的形式保存的数据
		var delta = {ops: []};
		var insert = {};
		var arr = coursePackageDesc.split("</p><p>");
		for(var i = 0 ; i< arr.length ; i++){
			var item = arr[i];
			item = item.replace("<p>","").replace("</p>", "").replace("<br>","\n");
			
			if(item.indexOf('<img') < 0){//不含img，即不是图片
				insert = {insert: item };
				delta.ops.push(insert);
				insert = {};
				
			}else{
				var _item = item.split("<");
				//匹配出<img>
				for(var j=0; j< _item.length; j++){
					if(_item[j].indexOf('img') < 0){
						insert = {insert: _item[j] };
						delta.ops.push(insert);
						insert = {};
					}else{
						var ss = _item[j].split(">");
						var srcArr = ss[0].split("=");
						var reg = /"/g;
						var srcUrls = srcArr[1].replace(new RegExp(reg),'');
						var srcUrl = srcUrls.split(" ");
						insert = {insert:{image:srcUrl[0]}};
						delta.ops.push(insert);
						insert = {};
						if(ss[1]){
							insert = {insert:"\n"};
							delta.ops.push(insert);
							insert = {};
							insert = {insert:ss[1]};
							delta.ops.push(insert);
							insert = {};
						}
					}
					
				}
				
			}
		}
		quillUpdate.setContents(delta);
	}
	function submitForm() {
		
		var coursePackageDesc = quillUpdate.root.innerHTML;
		$("#coursePackageDescUpdateVal").val(coursePackageDesc);
		
		var courseType = $('#coursePackageTypeUpdate').combobox('getValue');//选中的值
		if(courseType == 1){//话题课程包
			$('#userIdUpdate').combobox('setValue',"");//清空导师的值
		}else if(courseType == 2){
			var userId = $('#userIdUpdate').combobox('getValue');
			if(!userId){
				$.messager.alert('提示', '请选择导师');
				return;
			}
		}else{
			$.messager.alert('提示', '请选择课程包类型');
			return;
		}
		
		var params = getFormJson($('#update_form'));
		$.ajax({
			  type: 'POST',
			  url: '../coursepackage/coursePackageInfo/updateById.do',
			  data: params,
			  dataType: 'json',
			  async: false,
			  success: function(data){
				  if(data.err_code ==0){
					  $('#datagrid_update').window('close');
					  $('#datagrid_table').datagrid('reload');
				  }
			  },
			  error: function(xhr, type){
			    alert('Ajax error!')
			  }
		});
	}

	function cancelForm() {
		$('#datagrid_update').window('close');
	}

	/**
	 *删除记录之后执行函数
	 */
	function afterDelete() {
		
	}

	function clearForm() {
		$('#teaId').combobox('clear');
		$("#pId").val("");
		$("input[name='coursePackageType']").val(0);
	}

	function addFormSubmit() {
		var coursePackageDesc = quillAdd.root.innerHTML;
		$("#coursePackageDesc").val(coursePackageDesc);
		var courseType = $('#coursePackageType').combobox('getValue');//选中的值
		if(courseType == 1){//话题课程包
			$('#userId').combobox('setValue',"");//清空导师的值
		}else if(courseType == 2){
			var userId = $('#userId').combobox('getValue');
			if(!userId){
				$.messager.alert('提示', '请选择导师');
				return;
			}
		}else{
			$.messager.alert('提示', '请选择课程包类型');
			return;
		}
		
		var params = getFormJson($('#add_form'));
		$.ajax({
			  type: 'POST',
			  url: '../coursepackage/coursePackageInfo/insert.do',
			  data: params,
			  dataType: 'json',
			  async: false,
			  success: function(data){
				  if(data.err_code ==0){
					  $('#datagrid_add').window('close');
					  $('#datagrid_table').datagrid('reload');
				  }
			  },
			  error: function(xhr, type){
			    alert('Ajax error!')
			  }
		});
			
	}
	
	/**
	 *打开16:9照片上传组件
	 */
	function openPicUpload3(){
		uploadOneFile("uploadPoster2","/mrjy_file/common/util/uploadImg3.do?width=640&height=360","1000KB",100,30,"uploadPosterMessage2","backup/maintain/coursePackagePic/","coverUrl","uploadPic2");
	}
	
	/**
	 *打开16:9照片上传组件
	 */
	function openPicUploadUpdate2(){
		uploadOneFile("uploadPosterUpdate2","/mrjy_file/common/util/uploadImg3.do?width=640&height=360","1000KB",100,30,"uploadPosterMessageUpdate2","backup/maintain/coursePackagePic/","coverUrlUpdate","uploadPicUpdate2");
	}
	
	//将form中的值转换为键值对。
	function getFormJson(frm) {
	    var o = {};
	    var a = $(frm).serializeArray();
	    $.each(a, function () {
	        if (o[this.name] !== undefined) {
	            if (!o[this.name].push) {
	                o[this.name] = [o[this.name]];
	            }
	            o[this.name].push(this.value || '');
	        } else {
	            o[this.name] = this.value || '';
	        }
	    });

	    return o;
	}
	function imageHandlerAdd(){
		var _this3 = this;
      	var fileInput = this.container.querySelector('input.ql-image[type=file]');
      	if (fileInput == null) {
	        fileInput = document.createElement('input');
	        fileInput.setAttribute('type', 'file');
	        fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/jpg, image/bmp, image/x-icon');
	        fileInput.classList.add('ql-image');
	        fileInput.addEventListener('change', function () {
	        	if (fileInput.files != null && fileInput.files[0] != null) {
	        		uploadPic(fileInput.files[0],function(data){
	        			fileInput.value = "";
	        			quillAdd.insertEmbed(quillAdd.getLength, 'image',  mrjyFile + data.url);
	        		});
	        	}
	        });
	        //这句不加的话，微信上传不了图片
	        this.container.appendChild(fileInput);
	    }
      	fileInput.click();
	}
	function imageHandlerUpdate(){
		var _this3 = this;
      	var fileInput = this.container.querySelector('input.ql-image[type=file]');
      	if (fileInput == null) {
	        fileInput = document.createElement('input');
	        fileInput.setAttribute('type', 'file');
	        fileInput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/jpg, image/bmp, image/x-icon');
	        fileInput.classList.add('ql-image');
	        fileInput.addEventListener('change', function () {
	        	if (fileInput.files != null && fileInput.files[0] != null) {
	        		uploadPic(fileInput.files[0],function(data){
	        			fileInput.value = "";
	        			quillUpdate.insertEmbed(quillUpdate.getLength, 'image',  mrjyFile + data.url);
	        		});
	        	}
	        });
	        //这句不加的话，微信上传不了图片
	        this.container.appendChild(fileInput);
	    }
      	fileInput.click();
	}
	function uploadPic(file,callback){
		var fd = new FormData();
		fd.append("uploadFile",file);
		var xhr= new XMLHttpRequest();
		xhr.open("post", getTimeURL(mrjyFileUrl + "coursepackageFile/coursepackageInfo/uploadBackForCoursePackage.do"), true);
		xhr.onreadystatechange = function() {
		    if (xhr.readyState === 4) {
		    	console.log(xhr.responseText);
		      var response = JSON.parse(xhr.responseText);
		      if (response.status === "200") {
		        callback(response);
		      } else {
		        var reader = new FileReader();
		        reader.onload = function(e) {
		          callback(response);
		        };
		        reader.readAsDataURL(image);
		      }
		    }else if(xhr.readyState === 3){
		    }
		}
		xhr.send(fd);
		
	}
	
</script>
<script type="text/javascript">
	var quillAdd ="";
	var quillUpdate = "";
	$(function() {
		$("#userIdQuery").combobox({
			url : "../maintain/userInfo/userListNoPage.do?roleId=2",
			valueField : 'id',
			textField : 'text',
			editable : true,
			onSelect : function(data) {
			}
		});
		
	});
</script>
<script type="text/javascript" src="js/course_package_info.js"></script> 

</head>
<body id="layout" class="easyui-layout">
	<div
		style="background: none repeat scroll 0% 0% #EFEFEF; height: 68px; padding: 6px 2px; border-bottom: 1px solid #CCC;"
		region="north" split="false" title="条件查询">
		<form id="searchForm">
			<table>
				<tr>
					<td width="20px"></td>
					<td>导师：</td>
					<td>
						<input type="text" id="userIdQuery" name="userId" style="width: 120px" />
					</td>
					<td width="20px"></td>
					<td>课程包类型：</td>
					<td>
						<select id="coursePackageTypeQuery"  name="coursePackageType" class="easyui-combobox" ">
							<option value = "0"> 全部 </option>
							<option value = "1"> 话题课程包 </option>
							<option value = "2"> 导师课程包 </option>
						</select>
					</td>
					<td width="20px"></td>
					<td>
						<a class="easyui-linkbutton" id="search" iconCLs="icon-search" onclick="searchTable()">搜索</a>
					</td>
					<td>
						<a class="easyui-linkbutton" iconCls="icon-undo" onclick="document.getElementById('searchForm').reset();clearForm();reload();">清空</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div region="center" style="font-family: 微软雅黑">
		<!-- datagrid信息表 -->
		<table id="datagrid_table"></table>
	</div>
	<!-- 添加记录 -->
	<div id="datagrid_add">
		<form id="add_form" action="coursePackageInfo/insert.do" method="POST">
			<input type="hidden" id="coverUrl" name="coverUrl" onclick='openPicUpload3()'>
			<table border="0" width="770" class="xxl_tb_1"
				style="font-size: 13px">
				<tbody>
					<tr>
						<td class="xxl_td_1">课程包名称：</td>
						<td width="300"><input type="text" id="coursePackageName"
							name="coursePackageName" 
							class="xxl_ipt_2" /></td>
						<td width="300"><div id="coursePackageNameTip" style="width: 250px"></div></td>
					</tr>
					<tr>
						<td class="xxl_td_1">课程包描述：</td>
						<td width="375">
							<!-- <input type="text" id="coursePackageDesc" name="coursePackageDesc"	class="xxl_ipt_2" /> -->
							<div class="standalone-container">
								<!-- 创建工具栏组件 -->
								<div id="toolbarAdd">
								   <button class="ql-image">Image</button>
								</div>
								<!-- 创建文本编辑器 -->
								<div id="coursePackageDescAdd">
									
								</div>
			        		</div>
			        		<input type="hidden" id="coursePackageDesc" name="coursePackageDesc"  />
						</td>
						
					</tr>
					<tr>
						<td class="xxl_td_1">折扣价：</td>
						<td colspan="2">
							<input type="text" id="discountPrice" name="discountPrice"  class="easyui-numberbox" min="0" precision="2" max="99999.99" />
						</td>
					</tr>
					<tr>
						<td class="xxl_td_1" width="120">原价：</td>
						<td width="250">
							<input type="text" id="originalPrice" name="originalPrice"  class="easyui-numberbox" min="0" precision="2" max="99999.99" />
						</td>
						<td width="300"><div id="originalPriceTip" style="width: 250px"></div></td>
					</tr>
					<tr>
						<td class="xxl_td_1" width="120">总课堂数：</td>
						<td width="250">
							<input type="text" id="totalCourseNum" name="totalCourseNum"  class="easyui-numberbox" />
						</td>
						<td width="300"><div id="totalCourseNumTip" style="width: 250px"></div></td>
					</tr>
					<tr>
						<td class="xxl_td_1">课程包类型：</td>
						<td colspan="2">
						<select id="coursePackageType" name="coursePackageType" class="easyui-combobox" style="width:160px;height:22px;" >
							<option value = "1" > 话题课程包 </option>
							<option value = "2" selected> 导师课程包 </option>
						</select>
					</td>
					</tr>
					<tr id= "userId_Add_tr">
						<td class="xxl_td_1">导师名称：</td>
						<td colspan="1"><input type="text" id="userId" name="userId" /></td>
						<td><div id="userIdTip" style="width: 200px"></div></td>
					</tr>
					<tr >
						<td class="xxl_td_2">上传封面照片：</td>
						<td><input id='uploadPoster2' type='file'  name='uploadPoster' /><span id='uploadPosterMessage2' style='margin-left:10px'></span></td>	
							<td ><img style="height: 72px;width: 128px;" id="uploadPic2" src=""/><div style="color:red"> *照片后缀名为png，格式为640*360px</div></td>
					</tr>
					<tr>
						<td colspan="3" style="text-align: center"><a
							class="easyui-linkbutton" iconCls="icon-ok"
							onclick="addFormSubmit()">添加</a> <a class="easyui-linkbutton"
							iconCls="icon-undo"
							onclick="document.getElementById('add_form').reset()">重置</a> <a
							class="easyui-linkbutton" iconCls="icon-cancel"
							onclick="$('#datagrid_add').window('close');">取消</a></td>
					</tr>
				</tbody>
			</table>
		</form>
	</div>

	<!-- 修改记录 -->
	<div id="datagrid_update">
		<form id="update_form" action="coursePackageInfo/updateById.do" method="post">
			<input type="hidden" id="idUpdate" name="id" />
			<input type="hidden" id="coverUrlUpdate" name="coverUrl" onclick='openPicUploadUpdate2()'>
			<table border="0" width="770" class="xxl_tb_1">
				<tbody>
					<tr>
						<td class="xxl_td_2">课程包名称：</td>
						<td >
							<input type="text" id="coursePackageNameUpdate"	name="coursePackageName" />
						</td>
					</tr>
					<tr>
						<td class="xxl_td_2">课程包描述：</td>
						<td width="375">
							<div class="standalone-container">
								<!-- 创建工具栏组件 -->
								<div id="toolbarUpdate">
								   <button class="ql-image">Image</button>
								</div>
								<!-- 创建文本编辑器 -->
								<div id="coursePackageDescUpdate">
									
								</div>
			        		</div>
			        		<input type="hidden" id="coursePackageDescUpdateVal" name="coursePackageDesc"  />
						</td>
					</tr>
					<tr>
						<td class="xxl_td_2">折扣价：</td>
						<td >
							<input type="text" id="discountPriceUpdate" name="discountPrice"  class="easyui-numberbox" min="0" precision="2" max="99999.99"  />
						</td>
					</tr>
					<tr>
						<td class="xxl_td_2" width="120">原价：</td>
						<td>
							<input type="text" id="originalPriceUpdate" name="originalPrice"  class="easyui-numberbox" min="0" precision="2" max="99999.99" />
						</td>
					</tr>
					<tr>
						<td class="xxl_td_2" width="120">总课堂数：</td>
						<td >
							<input type="text" id="totalCourseNumUpdate" name="totalCourseNum"  class="easyui-numberbox" />
						</td>
					</tr>
					<tr>
						<td class="xxl_td_2">课程包类型：</td>
						<td >
							<select id="coursePackageTypeUpdate" name="coursePackageType" class="easyui-combobox" style="width:160px;height:22px;" >
								<option value = "1" > 话题课程包 </option>
								<option value = "2" selected> 导师课程包 </option>
							</select>
						</td>
					</tr>
					<tr id= "userIdUpdate_Add_tr">
						<td class="xxl_td_2">导师名称：</td>
						<td ><input type="text" id="userIdUpdate" name="userId" /></td>
					</tr>
					<tr >
						<td class="xxl_td_2">上传封面照片：</td>
						<td><input id='uploadPosterUpdate2' type='file'  name='uploadPoster' /><span id='uploadPosterMessageUpdate2' style='margin-left:10px'></span></td>	
							<td ><img style="height: 72px;width: 128px;" id="uploadPicUpdate2" src=""/><div style="color:red"> *照片后缀名为png，格式为640*360px</div></td>
					</tr>
					<tr>
						<td colspan="3" style="text-align: center"><a
							class="easyui-linkbutton" iconCls="icon-ok"
							onclick="submitForm()">修改</a> <a class="easyui-linkbutton"
							iconCls="icon-cancel" onclick="cancelForm()">取消</a></td>
					</tr>
				</tbody>
			</table>
		</form>
	</div>
	<!-- 批量添加视频列表  -->
	<div id="datagrid_add_video" >
		<div
		style="background: none repeat scroll 0% 0% #EFEFEF; height: 50px; padding: 6px 2px; border-bottom: 1px solid #CCC;"
		region="north" split="false" title="条件查询">
		<form id="videoSearchForm">
			<table>
				<tr>
					<td width="20px"></td>
					<td>主讲人：</td>
					<td>
						<input type="text" id="videoUserIdQuery" name="userId" style="width: 120px" />
					</td>
					<td width="20px"></td>
					<td>视频名称：</td>
					<td>
						<input type="text" id="videoNameQuery" name="videoName" style="width: 120px" />
					</td>
					<td width="20px"></td>
					<td>
						<a class="easyui-linkbutton" id="search" iconCLs="icon-search" onclick="videoSearchTable()">搜索</a>
					</td>
					<td>
						<a class="easyui-linkbutton" iconCls="icon-undo" onclick="document.getElementById('videoSearchForm').reset();videoClearForm();videoReload();">清空</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
		<!-- datagrid信息表 -->
		<table id="datagrid_table_video"></table>
	</div>

</body>
</html>